package com.tx.admin.security.service;

import java.awt.image.BufferedImage;
import java.util.List;

import com.tx.admin.core.anno.Rbac;
import com.tx.admin.core.anno.RbacMapping;
import com.tx.admin.modules.base.entity.RbacEntity;
import com.tx.admin.core.po.LoginPo;
import com.tx.admin.modules.rbac.entity.DataFunctionEntity;
import com.tx.admin.modules.rbac.entity.DataPermissionEntity;
import com.tx.admin.modules.rbac.entity.DepartmentEntity;
import com.tx.admin.modules.rbac.entity.RoleEntity;
import com.tx.admin.modules.rbac.entity.UserEntity;

public interface SecurityService {


	
	//根据用户名查询
	UserEntity findByUserName(String userName);

	//创建邮件验证码
     void createVerifyCodeByMail(LoginPo loginParams) ;
     
     //根据邮件验证码修改密码
     void updatePasswordByMail (LoginPo loginParams);


     void login(LoginPo params);
     
	//注销
	void logout();

	//创建验证码
	BufferedImage  createVerifyCode();


	//切换身份

	 void runUser(String userName) ;
	
	 //刷新角色
	 void flushRole();
	 
	 
	 String getToken();
	 
	 void queryRbacEntity(RbacEntity entity,Rbac rbac, RbacMapping rbacMapping);
	 
	 void saveRbacEntity(RbacEntity entity,Rbac rbac, RbacMapping rbacMapping);

	 List<RoleEntity> getRoleAll();
	 
	 List<DataFunctionEntity> getDataFunction();
	 
	 List<DataPermissionEntity> getDataPermission();
	 
	 UserEntity getUser() ;
	 
	 DepartmentEntity getDepartment();
}
